import java.util.Arrays;
import java.util.Scanner;

public class demo04 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] arr=new int[n];
        for (int i = 0; i < n; i++) {
            arr[i]=sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            int num=arr[i];
            int count1=0;
            int count2=0;
            for (int j = 0; j < n; j++) {
                if(num<arr[j]){
                    count1++;//大
                }else if (num>arr[j]){
                    count2++;//小
                }
            }
            int len=count1-count2;
            if(len<=0){
                System.out.print(0+" ");
            }else {
                int[] arr1=new int[n];
                for (int j = 0; j < n; j++) {
                    arr1[j]=arr[j];
                }
                Arrays.sort(arr1);
                int index=0;
                for (int j = 0; j < n; j++) {
                    if(arr[i]==arr1[j]){
                        index=j;
                        break;
                    }
                }
                int num1 = arr1[index + len/2] - arr1[index]+1;
                System.out.print(num1+" ");
            }
        }
    }
}
